﻿CREATE TABLE [dbo].[News]
(
	[Id] INT NOT NULL PRIMARY KEY CLUSTERED IDENTITY, 
    [Title] NVARCHAR(100) NULL, 
    [Author] NVARCHAR(50) NULL, 
    [AddTime] DATETIME NOT NULL DEFAULT GETDATE(), 
    [Views] INT NOT NULL DEFAULT 0, 
    [Type] INT NULL, 
    [Keywords] VARCHAR(100) NULL, 
    [Content] NVARCHAR(MAX) NULL, 
    CONSTRAINT [FK_News_ToType] FOREIGN KEY ([Type]) REFERENCES [NewsType]([Id])
)
